<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script type="text/javascript" src="/static/js3/jQuery-2.1.4/jquery-2.1.4.min.js"></script>
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link href="/static/bootstrap/bootstrap-3.3.7-dist/css/bootstrap.css" rel="stylesheet">
    <script src="/static/bootstrap/bootstrap-3.3.7-dist/js/bootstrap.js"></script>
    <script>
        $(function () {
            $('#toSave').click(function () {
                $('#myModal').modal('show');
            })
        })
    </script>
</head>
<body>
<!-- Button trigger modal -->
<button id="toSave" type="button" class="btn btn-primary btn-lg" data-toggle="modal">
<!--<button id="toSave" type="button" class="btn btn-primary btn-lg" data-toggle="modal" data-target="#myModal">-->
    新增
</button>

<!-- Modal -->
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span>
                </button>
                <h4 class="modal-title" id="myModalLabel">部门新增</h4>
            </div>
            <div class="modal-body">
                <form>
                    <div class="form-group">
                        <label for="inputName">名称</label>
                        <input type="text" class="form-control" name="name" id="inputName" placeholder="名称">
                    </div>
                    <div class="form-group">
                        <label for="inputSn">编号</label>
                        <input type="text" class="form-control" name="sn" id="inputSn" placeholder="编号">
                    </div>
                </form>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default" data-dismiss="modal">保存</button>
                <button type="button" class="btn btn-primary">取消</button>
            </div>
        </div>
    </div>
</div>
</body>
</html>